package com.ruoyi.system.domain;


import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.apache.ibatis.type.Alias;


/**
 * 附件对象 sys_file
 * 
 * @author ruoyi
 * @date 2022-09-04
 */
@Alias("SystemFile")
@TableName("sys_file")
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class SysFile extends BaseEntity
{
    private static final long serialVersionUID = 1L;
    public static final Integer SOURCE_SYSTEM = 0;

    public static final Integer SOURCE_IOT = 1;

    /** 主键 */
    @TableId
    @TableField("`id`")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;

    /** 名称 */
    @Excel(name = "名称")
    @TableField("`file_name`")
    private String fileName;

    /** 大小 */
    @Excel(name = "大小")
    @TableField("`file_size`")
    private Long fileSize;

    /** 类型 */
    @Excel(name = "类型")
    @TableField("`type`")
    private String type;

    /** 路径 */
    @Excel(name = "路径")
    @TableField("`path`")
    private String path;

    /** 文件来源 */
    @Excel(name = "文件来源")
    @TableField("`source`")
    private Integer source;

    /** 缩略图文件路径 */
    @Excel(name = "缩略图文件路径")
    @TableField("`thumbnail`")
    private String thumbnail;

}
